import React from 'react';
import { ESideMenuKey } from '../SourceSide/types';
import { sideMenuComponentList } from './constant';
import $style from './style.module.less';

interface IProps {
  activeIndex?: ESideMenuKey;
}

export const SourceControl: React.FC<IProps> = ({ activeIndex = ESideMenuKey.Lib }) => {
  const C = sideMenuComponentList[activeIndex];
  return (
    <div className={$style.sourceControlWrapper}>
      <C />
    </div>
  );
};
